<!DOCTYPE html>
<html>
<head>
    <title>Title</title>
    <#include "head.ftl"/>
    <#include "_macro/page_btn.ftl"/>
    <#include "_macro/page_table.ftl"/>
    <#include "_macro/page_field.ftl"/>
    <#include "_macro/page_view.ftl"/>
</head>
<body class="margin-0">
<form class="layui-form" action="">
    <input type="hidden" value="${data.id!}" name="id"/>
    <div class="edit-bar">
        <button type="submit" class="layui-btn layui-btn-sm" lay-submit="" lay-filter="save">保&nbsp;&nbsp;存</button>
        <button type="submit" class="layui-btn layui-btn-sm layui-btn-danger" lay-submit="" lay-filter="gencode">生成代码</button>
    </div>
    <div class="layui-row edit-form">
        <div class="layui-col-md4">
            <label class="layui-form-label">页面标题</label>
            <div class="layui-input-inline">
                <input type="text" lay-verify="required" value="${data.title!}" name="title" autocomplete="off" placeholder="请输入标题" class="layui-input"/>
            </div>
        </div>
        <div class="layui-col-md4">
            <label class="layui-form-label">对象实体</label>
            <div class="layui-input-inline">
                <select name="entityId">
                    <option value=""></option>
                    <@dict code="entity">
                        <#list dicts as dict>
                            <option value="${dict.value}" ${(data.entityId?? && data.entityId?string==dict.value)?string('selected','')}>${dict.note}</option>
                        </#list>
                    </@dict>
                </select>
            </div>
        </div>
        <!--
        <div class="layui-col-md4">
            <label class="layui-form-label">页面类型</label>
            <div class="layui-input-inline">
                <select name="type" lay-verify="required">
                    <option value=""></option>
                    <@dict code="PAGETYPE">
                        <#list dicts as dict>
                            <option ${(data.type?? && data.type==dict.value)?string('selected','')} value="${dict.value}">${dict.note}</option>
                        </#list>
                    </@dict>
                </select>
            </div>
        </div>

        <div class="layui-col-md4">
            <label class="layui-form-label">模板</label>
            <div class="layui-input-inline">
                <select name="template">
                    <option value="">默认模板</option>
                </select>
            </div>
        </div>
        <div class="layui-col-md4">
            <label class="layui-form-label">打开方式</label>
            <div class="layui-input-inline">
                <select name="displayMode">
                    <option value=""></option>
                    <option value="1" ${(data.displayMode?? && data.displayMode=='1')?string('selected','')}>标签页</option>
                    <option value="2" ${(data.displayMode?? && data.displayMode=='2')?string('selected','')}>弹窗页</option>
                    <option value="3" ${(data.displayMode?? && data.displayMode=='3')?string('selected','')}>新页面</option>
                </select>
            </div>
        </div>
        <div class="layui-col-md4">
            <label class="layui-form-label">宽度</label>
            <div class="layui-input-inline">
                <input type="text" name="width" autocomplete="off" placeholder="请输入" value="${data.width!}" class="layui-input">
            </div>
        </div>
        <div class="layui-col-md4">
            <label class="layui-form-label">高度</label>
            <div class="layui-input-inline">
                <input type="text" name="height" autocomplete="off" placeholder="请输入" value="${data.height!}" class="layui-input">
            </div>
        </div>
        -->
    </div>
    <div class="layui-card layui-card-border margin-5">
        <div class="layui-card-header">
            查询页URL：${module!}/page/query
        </div>
    </div>
    <div class="layui-card layui-card-border margin-5">
        <div class="layui-card-header">
            查询条件
        </div>
        <div class="layui-card-body">
            <div id="queryConView" class="layui-row search">
                <#list data.queryCon as item>
                    <@fieldView  field="${item.field!}" title="${item.title!}" width="${item.width!}" type="${item.type!}" dict="${item.dict!}" verify="${item.verify!}" max="${item.max!}" min="${item.min!}"></@fieldView>
                </#list>
                <div class="layui-col-md12">
                    <div class="layui-btn layui-btn-primary add-btn">添加</div>
                </div>
            </div>
        </div>
    </div>
    <div class="layui-card layui-card-border margin-5">
        <div class="layui-card-header">
            操作
        </div>
        <div class="layui-card-body">
            <div id="queryActView" class="layui-row search">
                <#list data.queryAct as item>
                    <@btnView css ="${item.css!}" title="${item.title!}" func="${item.func!}"></@btnView>
                </#list>
                <div class="layui-col-md12">
                    <div class="layui-btn layui-btn-primary add-btn">添加</div>
                </div>
            </div>
        </div>
    </div>
    <div class="layui-card layui-card-border margin-5">
        <div class="layui-card-header">
            列操作
        </div>
        <div class="layui-card-body">
            <div id="btnShowView" class="layui-row search">
                <#list data.queryColAct as item>
                    <@btnView css ="${item.css!}" title="${item.title!}" func="${item.func!}"></@btnView>
                </#list>
                <div class="layui-col-md12">
                    <div class="layui-btn layui-btn-primary add-btn">添加</div>
                </div>
            </div>
        </div>
    </div>
    <div class="layui-card layui-card-border margin-5">
        <div class="layui-card-header">
            列字段
        </div>
        <div class="layui-card-body">
            <div id="colShowView" class="layui-row search">
                <#list data.queryCol as item>
                    <@colView  field="${item.field!}" alias="${item.alias!}" title="${item.title!}" width="${item.width!}" sort="${item.sort!}" event="${item.event!}"></@colView>
                </#list>
                <div class="layui-col-md12">
                    <div class="layui-btn layui-btn-primary add-btn">添加</div>
                </div>
            </div>
        </div>
    </div>
    <div class="layui-card layui-card-border margin-5">
        <div class="layui-card-header">
            编辑页URL：${module!}/page/edit?id=###
        </div>
    </div>
    <div class="layui-card layui-card-border margin-5">
        <div class="layui-card-header">
            表单操作
        </div>
        <div class="layui-card-body">
            <div id="formActView" class="layui-row search">
                <#list data.formAct as item>
                    <@btnView css ="${item.css!}" title="${item.title!}" func="${item.func!}"></@btnView>
                </#list>
                <div class="layui-col-md12">
                    <div class="layui-btn layui-btn-primary add-btn">添加</div>
                </div>
            </div>
        </div>
    </div>
    <div class="layui-card layui-card-border margin-5">
        <div class="layui-card-header">
            表单
        </div>
        <div class="layui-card-body">
            <div id="formColView" class="layui-row search">
                <#list data.formCol as item>
                    <@fieldView  field="${item.field!}" title="${item.title!}" width="${item.width!}" type="${item.type!}" dict="${item.dict!}" verify="${item.verify!}" max="${item.max!}" min="${item.min!}" ></@fieldView>
                </#list>
                <div class="layui-col-md12">
                    <div class="layui-btn layui-btn-primary add-btn">添加</div>
                </div>
            </div>
        </div>
    </div>
    <div class="layui-card layui-card-border margin-5">
        <div class="layui-card-header">
            查看URL：${module!}/page/view?id=###
        </div>
    </div>
    <div class="layui-card layui-card-border margin-5">
        <div class="layui-card-header">
            列字段
        </div>
        <div class="layui-card-body">
            <div id="viewColView" class="layui-row search">
                <#list data.viewCol as item>
                    <@viewView  field="${item.field!}" alias="${item.alias!}" title="${item.title!}" width="${item.width!}" type="${item.type!}"></@viewView>
                </#list>
                <div class="layui-col-md12">
                    <div class="layui-btn layui-btn-primary add-btn">添加</div>
                </div>
            </div>
        </div>
    </div>
</form>
<script type="text/javascript" src="/js/page_edit.js"></script>
</body>
</html>